﻿using YamlDotNet.Serialization;

namespace DesktopToy.Core.Common;

public class Config
{
    public static Config ReadConfig()
    {
        var deserializer = new DeserializerBuilder().Build();
        var yaml = File.ReadAllText(PathHelper.GetResourcePath("Config.yml"));
        return deserializer.Deserialize<Config>(yaml);
    }
    
    public required string WebServiceApiKey { set; get; }
    public required int WeatherAdcode { set; get; }
}
